package com.itheima.health.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.itheima.health.pojo.OrderSetting;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

public interface OrderSettingService extends IService<OrderSetting> {

    //将xlsx表格上传到数据库
    void importOrderSettings(List<String[]> orderSettingList);

    //查询当前日期的预约数据
    //设计Map响应给前端需要的数据格式
    //this.settingData = {
    //"2020-09-01":{number:200,reservations:200},
    Map findSettingData(int year, int month);

    //更新当前日期的最大预约人数
    Boolean updateNumberByOrderdate(int number, String settingDay);

    //移动端效验是否已经预约满
    int isOrderOk(String orderDate);

    //移动端更新预约人数表,预约成功，预约人数+1
    void updateReservationByOrderDate(String orderDate);

    //定时清理预约历史数据
    void xxiJobClearorderSetting();
}
